<!DOCTYPE html>
<html>
	<head>
		<title>欢迎登录</title>
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="keywords" content="Internship Sign In & Sign Up Form Responsive Widget,Login form widgets, Sign up Web forms , Login signup Responsive web form,Flat Pricing table,Flat Drop downs,Registration Forms,News letter Forms,Elements" />
		<script type="application/x-javascript">
			addEventListener("load", function() {
				setTimeout(hideURLbar, 0);
			}, false);

			function hideURLbar() {
				window.scrollTo(0, 1);
			}
		</script>
		<!-- Custom Theme files -->
		<link href="css/font-awesome.min.css" rel="stylesheet" type="text/css" media="all">
		<link href="css/snow.css" rel="stylesheet" type="text/css" media="all" />
		<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
		
		
		<link rel="stylesheet" href="css/load-global.css">
		<link rel="stylesheet" href="css/load-loading.css">

	</head>

	<body>
		<div class="snow-container">
			<div class="snow foreground"></div>
			<div class="snow foreground layered"></div>
			<div class="snow middleground"></div>
			<div class="snow middleground layered"></div>
			<div class="snow background"></div>
			<div class="snow background layered"></div>
		</div>

		<div class="top-buttons-agileinfo">
			<a href="signin.html" class="active">登录</a>
			<a href="signup.html">注册</a>
		</div>
		<h1>MobileGroup</h1>
		<div class="main-agileits">
			<div class="form-w3-agile">
				<h2 class="sub-agileits-w3layouts">登录</h2>
				<input type="email" name="account" placeholder="账户" required="true" />
				<input type="password" name="password" placeholder="密码" required="" />
				<a href="#" class="forgot-w3layouts">忘记密码 ?</a>
				<div class="submit-w3l">
					<input type="submit" value="登录" id="submitBtn">
				</div>
				<p class="p-bottom-w3ls">
					<a href="signup.html">点击注册</a>如果你没有一个帐户。</p>
				</form>
			</div>
		</div>
		<!-- copyright -->
		<div class="copyright w3-agile">
			<p>©2017-2018</p>
		</div>
		<script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
		<script type="text/javascript" src="js/layer/layer.js" ></script>
		<script type="text/javascript" src="js/base.js" ></script>
		<script type="text/javascript" src="js/loading.js" ></script>
	</body>
	<script type="text/javascript">

	$("#submitBtn").click(function() {
		var account = $("[name=account]").val();
		var password = $("[name=password]").val();
		if(account == ""){
			layer.msg("账号不能为空", {icon: 0});
			return;
		}
		if(password == ""){
			layer.msg("密码不能为空", {icon: 0});
			return;
		}
		loading1();
		$.ajax({
			type: "POST",
			url: $.httpRootPath()+"/api/web/log/login",
			dataType: "json",
			data: {
			account: account,
			password: password },
			success: function(reply) {
				if(reply.code == 0) {
					layer.msg('登陆成功,连接已建立', {icon: 1});
					setTimeout(
						function(){window.location.href ='index.html'},
      						1000);
						} else {
							layer.msg('登陆失败', {icon: 0});
						}
					}
			})
		removeLoading('test');
		});
	</script>

</html>